package com.ku.user.common.utils;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class Result {
    private long code;
    private String messages;
    private Object result;

    public static Result success() {
        return  Result.builder().code(10000).messages("操作成功").result("").build();
    }
    public static Result success(Object result) {
        return  Result.builder().code(10000).messages("操作成功").result(result).build();
    }

    public static Result error() {
        return Result.builder().code(10001).messages("失败").result("").build();
    }
    public static Result error(String messages) {
        return Result.builder().code(10001).messages(messages).result("").build();
    }
}
